﻿(function () {
    var sidebar_num = $("#num").html();
    sidebar_num = parseInt(sidebar_num) ? sidebar_num : 0;
    var sidebar = $("#menu ul li");
    sidebar = sidebar.splice(2, sidebar.length - 2);
    for (var idx in sidebar) {
        if (idx == sidebar_num) {
            $(sidebar[idx]).addClass("active");
            break;
        }
    }
}());